package org.grapes.wine.api.server.model.dao;

import org.grapes.wine.api.server.model.DAOName;
import org.grapes.wine.api.server.model.IDAO;
import org.hibernate.search.annotations.DocumentId;
import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Index;
import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Store;

@Indexed
public class YachtDAO implements IDAO {
	@DocumentId
	private String id;
	private int version;
	@Field(index = Index.TOKENIZED, store = Store.NO)
	private String type;
	@Field(index = Index.TOKENIZED, store = Store.NO)
	private int price;
	@Field(index = Index.TOKENIZED, store = Store.NO)
	private int capacity;

	public YachtDAO() {
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getId() {
		return id;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public int getVersion() {
		return version;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public int getCapacity() {
		return capacity;
	}

	public void setCapacity(int capacity) {
		this.capacity = capacity;
	}

	public DAOName getDAOName() {
		return DAOName.Yacht;
	}

	public String[] paramName() {
		return new String[] { "type", "price", "capacity" };
	}
}
